package com.operation.webController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.operation.PROJECT_URL;
import com.operation.form.BoardForm;
import com.operation.form.ReserveForm;
import com.operation.service.BoardService;
import com.operation.service.ReserveService;

/**
 * Handles requests for the application home page.
 */
@Controller
public class WebController extends SuperController{
	
	@RequestMapping(value = "/", method = RequestMethod.GET)
	public ModelAndView index(HttpServletRequest request, BoardForm form,
			BindingResult errors, ModelMap model) {		
		
		 ModelAndView mav = new ModelAndView();
		 //mav.addObject("mybatis", userService.mybatis(form));    
		mav.setViewName("index");
		return mav;
		
	}	
	
	@RequestMapping(value = "/list.do", method = RequestMethod.GET)
	public ModelAndView list(HttpServletRequest request, BoardForm form,
			BindingResult errors, ModelMap model) {		
		
		 ModelAndView mav = new ModelAndView();
		 //mav.addObject("mybatis", userService.mybatis(form));    
		mav.setViewName("list");
		return mav;
		
	}	
	
	@RequestMapping(value = "/infoView.do", method = RequestMethod.GET)
	public ModelAndView infoView(HttpServletRequest request, BoardForm form,
			BindingResult errors, ModelMap model) {		
		
		 ModelAndView mav = new ModelAndView();
		 //mav.addObject("mybatis", userService.mybatis(form));    
		mav.setViewName("infoView");
		return mav;
		
	}	
	
	//회원가입 연동계정선택부분
	@RequestMapping(value = "/joinUserSelect.do", method = RequestMethod.GET)
	public ModelAndView joinUserSelect(HttpServletRequest request, BoardForm form,
			BindingResult errors, ModelMap model) {		
		
		 ModelAndView mav = new ModelAndView();
		 //mav.addObject("mybatis", userService.mybatis(form));    
		mav.setViewName("joinUserSelect");
		return mav;
		
	}
	
	//약관동의
		@RequestMapping(value = "/clickWrap.do", method = RequestMethod.GET)
		public ModelAndView clickWrap(HttpServletRequest request, BoardForm form,
				BindingResult errors, ModelMap model) {		
			
			 ModelAndView mav = new ModelAndView();
			 //mav.addObject("mybatis", userService.mybatis(form));    
			mav.setViewName("clickWrap");
			return mav;
			
		}
	
	
	//정보입력
	@RequestMapping(value = "/infoInput.do", method = RequestMethod.POST)
	public ModelAndView infoInput(HttpServletRequest request, BoardForm form,
			BindingResult errors, ModelMap model) {		
		
		 ModelAndView mav = new ModelAndView();
		 //mav.addObject("mybatis", userService.mybatis(form));    
		mav.setViewName("infoInput");
		return mav;
		
	}
		
		
	//가입인증
	@RequestMapping(value = "/joinUserConfirm.do", method = RequestMethod.POST)
	public ModelAndView joinUserConfirm(HttpServletRequest request, BoardForm form,
			BindingResult errors, ModelMap model) {		
		
		 ModelAndView mav = new ModelAndView();
		 //mav.addObject("mybatis", userService.mybatis(form));    
		mav.setViewName("joinUserConfirm");
		return mav;
		
	}
		
		
	//가입완료
	@RequestMapping(value = "/joinUserComplete.do", method = RequestMethod.GET)
	public ModelAndView joinUserComplete(HttpServletRequest request, BoardForm form,
			BindingResult errors, ModelMap model) {		
		
		 ModelAndView mav = new ModelAndView();
		 //mav.addObject("mybatis", userService.mybatis(form));    
		mav.setViewName("joinUserComplete");
		return mav;
		
	}	
		
		
		
		
	//계정찾기
	@RequestMapping(value = "/accountFind.do", method = RequestMethod.GET)
	public ModelAndView accountFind(HttpServletRequest request, BoardForm form,
			BindingResult errors, ModelMap model) {		
		
		 ModelAndView mav = new ModelAndView();
		 //mav.addObject("mybatis", userService.mybatis(form));    
		mav.setViewName("accountFind");
		return mav;
		
	}	
		
		
		
	
	
	
	@RequestMapping(value = "/test.do", method = RequestMethod.GET)
	public ModelAndView test(HttpServletRequest request, BoardForm form,
			BindingResult errors, ModelMap model) {		
		
		 ModelAndView mav = new ModelAndView();
		 //mav.addObject("mybatis", userService.mybatis(form));    
		mav.setViewName("test");
		return mav;
		
	}
			
}
